package com.cnoja.jmsncn.ui.factory;

import javax.swing.JMenu;
import javax.swing.JMenuItem;

public class MenuFactory {
	private static MenuFactory instance = new MenuFactory();
	public static String FILE_MENU = "file";

	public JMenu getMenu(String menuName) {
		if (menuName.equals(FILE_MENU)) {
			JMenu menu = new JMenu("&File");

			menu.add(new JMenuItem("&Connect"));
			return menu;
		}

		return null;
	}

	public static MenuFactory getInstance() {
		if (instance == null) {
			instance = new MenuFactory();
		}
		return instance;
	}

}
